Dialog FUNCTION Action Returns an integer whose value indicates what type of button, edit-field, or window event occurred within the WindowDo procedure. Syntax variablename% = Dialog(op%) Remarks The Dialog procedure uses the following arguments. variablename% ------------- Any BASIC variable name, including the name of a record variable or record element. op% --- An integer that defines a specific operation that Dialog is to evaluate. The following table lists the possible values of op% and the information that is returned. op% Return Event-significance 0 0 No event took place. 1 A button was pressed. Use Dialog(1) to determine which button. 2 An edit field was selected. Use Dialog(2) to determine which field. 3 A window other than the current window was selected. Use Dialog(3) to determine which window. 4 Current window's close box was selected. 5 Current window needs to be refreshed because it was resized. 6 Enter key was pressed. 7 Tab key was pressed. 8 Shift+Tab was pressed. 9 Esc was pressed. 10 Up Arrow key was pressed. 11 Down Arrow key was pressed. 12 Left Arrow key was pressed. 13 Right Arrow key was pressed. 14 Spacebar was pressed. 15 Current window was moved. 16 Home key was pressed. 17 End key was pressed. 18 PgUp key was pressed. 19 PgDn key was pressed. 20 Menu item was chosen. 1 * Returns the number of the button just pressed. May be from 1 to the value declared in MAXBUTTON, inclusive. 2 * Returns the number of the edit field just selected. May be from 1 to the value declared in MAXEDITFIELD, inclusive. 3 n Returns the number of the window just selected. May be from 1 to the value declared in MAXWINDOW, inclusive. 4 - 15 Reserved for future use. 17 * Returns the row of the cursor within the field of button type 4. (See ButtonOpen.) May be from 1 to the value declared in MAXROW inclusive. 18 * Returns the column of the cursor within the field of button type 4. (See ButtonOpen.) May be from 1 to the value declared in MAXCOL, inclusive. 19 -2 Selected Down or Right direction key on scroll bar (button type 6 or 7). -1 Selected Up or Left direction key on scroll bar (button type 6 or 7) * Selected a position on grayed area of scroll bar. May be from 1 to the maximum number of positions on the scroll bar. 20 Reserved for future use. Using an op% value of 0, you can determine what happened; using the other arguments, you can determine where it happened. See Also. Alert, ListBox Example See the individual procedures in the code example UIDEMO.BAS for examples of specific usage.